package com.annotation.hw.hw3;

/**
 * @author bin
 * @date 2025 - 03 -28
 **/
public class Utils {
    public void Check(Class<?> clazz){
        if (clazz.isAnnotationPresent(myAnnotation.class)){
            myAnnotation annotation = clazz.getAnnotation(myAnnotation.class);
             String sexValue = annotation.sex();
//            String[] hobbysValue = annotation.hobby();
           if(sexValue.equals("male") || sexValue.equals("man")){
               throw new RuntimeException("性别不存在");
           }else{
               System.out.println("性别正确");
           }
        }

    }
}
